package com.yyf.blogapi.service;

import com.yyf.blogapi.po.Article;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yyf.blogapi.vo.Archives;
import com.yyf.blogapi.vo.ArticleVo;
import com.yyf.blogapi.vo.PageParams;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author yyf
 * @since 2021-08-16
 */
public interface IArticleService extends IService<Article> {

    List<ArticleVo> listArticle(PageParams pageParams);

    List<Article> hotArticle(int limit);

    List<Article> newArticle(int limit);

    List<Archives> listArchives();

    ArticleVo getArticleById(Long id);

    @Transactional
    Map<String, String> publish(ArticleVo articleVo);
}
